#ifndef LOADEROBJ_H
#define LOADEROBJ_H

#include <fstream>
#include <iostream>
#include <string>
#include "Export.h"
#include "ILoader.h"
#include "MeshData.h"

namespace glow 
{
  class SHARED LoaderOBJ : public ILoader<MeshData>
  {

  public :

    LoaderOBJ() {}
    ~LoaderOBJ() {}
    
    virtual MeshData *load (const std::string &filename);

  private:

    unsigned int _nbI, _nbV, _nbVt, _nbVn;
    unsigned *_indiceObj, *_finalIndex;
    float *_posObj, *_texObj, *_norObj;
    float *_pos, *_tex, *_nor;

    void count (std::string filename);
    void fill (std::string filename);

  };
}
#endif
